using System.Collections.Generic;
using UnityEngine;

public class AllDestroyAchievements : MonoBehaviour
{
	public static AllDestroyAchievements instanse;

	[Header("Simple Destroy Achievements")]
	public List<DestroyAchievement> simpleDestroyAchievements;

	private void Awake()
	{
		instanse = this;
	}

	private void Start()
	{
		InitializeAllAchievements();
	}

	public void CheckAllAchivments(KillInfo destroyInfo, WeaponType carType)
	{
		foreach (DestroyAchievement allDestroyAchievement in AchievementsManager.instanse.allDestroyAchievements)
		{
			if (allDestroyAchievement.CheckAchievement(destroyInfo, carType))
			{
				allDestroyAchievement.Increment();
			}
		}
	}

	public void InitializeAllAchievements()
	{
		foreach (DestroyAchievement simpleDestroyAchievement in simpleDestroyAchievements)
		{
			simpleDestroyAchievement.Init();
		}
	}
}
